
import com.jfinal.config.*;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.jfinal.plugin.druid.DruidPlugin;
import com.jfinal.template.Engine;

// JFinal 配置类
public class TestConfig extends JFinalConfig {

    public void configConstant(Constants constants) {
        constants.setToCglibProxyFactory();
    }

    public void configRoute(Routes routes) {

    }

    public void configEngine(Engine engine) {

    }

    public void configPlugin(Plugins plugins) {
       DruidPlugin dp = new DruidPlugin("jdbc:mysql://192.168.10.64:8059/beeeyehced", "root", "ldcroot");
       ActiveRecordPlugin arp = new ActiveRecordPlugin(dp);
       // 将 DbProFactory 设置为自定义的DbPro
       arp.setDbProFactory(TestDbPro::new);
       plugins.add(dp);
       plugins.add(arp);
    }

    public void configInterceptor(Interceptors interceptors) {

    }

    public void configHandler(Handlers handlers) {

    }
}
